package com.navi.heartbeat.entity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by fw_06 on 2018/2/8.
 */
//@Entity
//@Table(name = "qrtz_etl_detail", schema = "ch_qms", catalog = "")
//@IdClass(QrtzEtlDetailPK.class)
public class QrtzEtlDetail {
    private String schedName;
    private String instanceName;
    private Timestamp checkinTime;
    private Timestamp endTime;
    private Timestamp etlTime;
    private String relFlg;
    private String description;
    private String cronExpression;
    private String projectName;
    private Integer count;

//    @Id
//    @Column(name = "SCHED_NAME")
    public String getSchedName() {
        return schedName;
    }

    public void setSchedName(String schedName) {
        this.schedName = schedName;
    }

//    @Id
//    @Column(name = "INSTANCE_NAME")
    public String getInstanceName() {
        return instanceName;
    }

    public void setInstanceName(String instanceName) {
        this.instanceName = instanceName;
    }

//    @Basic
//    @Column(name = "CHECKIN_TIME")
    public Timestamp getCheckinTime() {
        return checkinTime;
    }

    public void setCheckinTime(Timestamp checkinTime) {
        this.checkinTime = checkinTime;
    }

//    @Basic
//    @Column(name = "END_TIME")
    public Timestamp getEndTime() {
        return endTime;
    }

    public void setEndTime(Timestamp endTime) {
        this.endTime = endTime;
    }

//    @Basic
//    @Column(name = "ETL_TIME")
    public Timestamp getEtlTime() {
        return etlTime;
    }

    public void setEtlTime(Timestamp etlTime) {
        this.etlTime = etlTime;
    }

//    @Id
//    @Column(name = "REL_FLG")
    public String getRelFlg() {
        return relFlg;
    }

    public void setRelFlg(String relFlg) {
        this.relFlg = relFlg;
    }

//    @Basic
//    @Column(name = "DESCRIPTION")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

//    @Basic
//    @Column(name = "CRON_EXPRESSION")
    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

//    @Id
//    @Column(name = "PROJECT_NAME")
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

//    @Basic
//    @Column(name = "COUNT")
    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        QrtzEtlDetail that = (QrtzEtlDetail) o;

        if (schedName != null ? !schedName.equals(that.schedName) : that.schedName != null) return false;
        if (instanceName != null ? !instanceName.equals(that.instanceName) : that.instanceName != null) return false;
        if (checkinTime != null ? !checkinTime.equals(that.checkinTime) : that.checkinTime != null) return false;
        if (endTime != null ? !endTime.equals(that.endTime) : that.endTime != null) return false;
        if (etlTime != null ? !etlTime.equals(that.etlTime) : that.etlTime != null) return false;
        if (relFlg != null ? !relFlg.equals(that.relFlg) : that.relFlg != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        if (cronExpression != null ? !cronExpression.equals(that.cronExpression) : that.cronExpression != null)
            return false;
        if (projectName != null ? !projectName.equals(that.projectName) : that.projectName != null) return false;
        if (count != null ? !count.equals(that.count) : that.count != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = schedName != null ? schedName.hashCode() : 0;
        result = 31 * result + (instanceName != null ? instanceName.hashCode() : 0);
        result = 31 * result + (checkinTime != null ? checkinTime.hashCode() : 0);
        result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
        result = 31 * result + (etlTime != null ? etlTime.hashCode() : 0);
        result = 31 * result + (relFlg != null ? relFlg.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (cronExpression != null ? cronExpression.hashCode() : 0);
        result = 31 * result + (projectName != null ? projectName.hashCode() : 0);
        result = 31 * result + (count != null ? count.hashCode() : 0);
        return result;
    }
}
